﻿namespace KingerRobot.MexicoSailunWMS.SpiService;

internal class BCuringSpareManageImpl : ICuringSpareManage
{
    ICuringSpare _Spare = new BCuringSpareImpl();
    public List<CuringSpareBeans> QueryCuringSpare()
    {
        return _Spare.QueryCuringSpare();
    }

    [OperationLog("喷涂比例修改")]
    public int UpdateSpareById(UpdateSpareParam param, long userId, string userName, string clientHost)
    {
        if (param is null) return -1;

        if (param.Id is null || param.Id <= 0) return -1;

        if (string.IsNullOrWhiteSpace(param.UserName)) return -1;

        if (param.SpareNum is null || param.SpareNum <= 0) return -1;

        return _Spare.UpdateSpareById(param);
    }
}
